package com.xxx.server.service;

import com.xxx.server.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xxx.server.pojo.Role;
import com.xxx.server.pojo.request.AdminLoginParam;
import com.xxx.server.pojo.response.RespBean;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cd
 * @since 2023-11-12
 */
@Service
public interface IAdminService extends IService<Admin> {

    /**
     * 登录之后返回token
     *
     * @param username
     * @param password
     * @param code
     * @param request
     * @return
     */
    RespBean login(String username, String password, String code, HttpServletRequest request);

    /**
     *  根据username返回用户对象
     * @param username
     * @return
     */
    Admin getAdminByUserName(String username);

    /**
     *
     * @param
     * @return
     */
    List<Role> getRoles(Integer adminId);
}
